<?php
namespace Wap\Model;
use Think\Model;

class CustomerModel extends Model
{
    // protected $tableName = "uploader";
    protected $tableName = "customer";

    public function registe( $datas )
    {
        $saved = array( "success" => false, "data" => array() );
        $validated = $this->create( $datas );
        $id = $this->add( $datas );
        //S( "debug_addcustomer", $id, 300 );

        if( $id > 0 ){
            $saved['success'] = true;
            $saved['data'] = $this->where( array( 'id' => $id ) )->find();
        }
        return $saved;
    }
}
